#ifndef RECTANGLE_H
#define RECTANGLE_H

#include "Vector2i.h"

//!Class that represents a rectangle
class CRectangle
{
public:
	//!Top coordinate
	int m_top;

	//!Left coordinate
	int m_left;

	//!Bottom coordinate
	int m_bottom;

	//!Right coordinate
	int m_right;

public:
	//!Constructor
	/*!
	\param top Top coordinate of the rectangle
	\param left Left coordinate of the rectangle
	\param bottom Bottom coordinate of the rectangle
	\param right Right coordinate of the rectangle
	*/
	CRectangle(int top, int left, int bottom, int right);

	//!Destructor
	~CRectangle();

	//!Set the top coordinate
	/*!
	\param top The new top coordinate
	*/
	void setTop(int top);

	//!Set the left coordinate
	/*!
	\param left The new left coordinate
	*/
	void setLeft(int left);

	//!Set the bottom coordinate
	/*!
	\param bottom The new bottom coordinate
	*/
	void setBottom(int bottom);

	//!Set the right coordinate
	/*!
	\param right The new right coordinate
	*/
	void setRight(int right);

	//!Get the top coordinate
	/*!
	\return The top coordinate
	*/
	int getTop()const;

	//!Get the left coordinate
	/*!
	\return The left coordinate
	*/
	int getLeft()const;

	//!Get the bottom coordinate
	/*!
	\return The bottom coordinate
	*/
	int getBottom()const;

	//!Get the right coordinate
	/*!
	\return The right coordinate
	*/
	int getRight()const;

	//!Translate the rectangle
	/*!
	\param translationVector The translation vector to apply to the rectangle.
	*/
	void translate(const CVector2i& translationVector);

	//!Check if there is a collision between this and otherRectangle.
	/*!
	\param otherRectangle The rectangle to test the collision with
	\return True if there is a collision. False if there is no collision.
	*/
	bool intersectWith(CRectangle otherRectangle);


};
#endif


